import type { RouteRecordRaw } from 'vue-router'

function Layout() {
  return import('@/layouts/index.vue')
}

const routes: RouteRecordRaw = {
  path: '/crmSys',
  component: Layout,
  name: 'crmSys',
  meta: {
    title: '订单管理',
    icon: 'ep:sold-out',
  },
  children: [
    {
      path: 'orderList',
      name: 'orderList',
      component: () => import('@/views/crm/orderList.vue'),
      meta: {
        title: '订单管理',
        menu: true,
        breadcrumb: false,
        icon: 'ep:shopping-cart-full',
        activeMenu: '/crmSys',
      },
    },
    {
      path: 'customer',
      name: 'customer',
      component: () => import('@/views/crm/customer.vue'),
      meta: {
        title: '客户管理',
        menu: true,
        breadcrumb: false,
        icon: 'ep:user',
        activeMenu: '/crmSys',
      },
    },
    {
      path: 'productList',
      name: 'productList',
      component: () => import('@/views/crm/productList.vue'),
      meta: {
        title: '在售商品',
        menu: true,
        breadcrumb: false,
        icon: 'ep:sell',
        activeMenu: '/crmSys',
      },
    },
  ],
}

export default routes
